import { makeAutoObservable } from 'mobx';
import { inject, injectable } from 'inversify';
import { UserModel } from '../models/user.model.ts';

@injectable()
export class UserViewModel {
  get user() {
    return this.userModel.user;
  }

  get connectedUsers() {
    return this.userModel.connectedUsers;
  }

  constructor(
    @inject(UserModel)
    private userModel: UserModel,
  ) {
    makeAutoObservable(this);
  }

  dispose() {
    this.userModel.dispose();
  }
}
